Conversation
for more information, see https://pre-commit.ci
|
The next step is to test overlapping and non-uniform background. I would need to set up a non-uniform initial condition to mimick realistic ISM. @BenWibking Do you have any idea how to quickly produce such an I.C.? |
I would just run it until you have multiple SN going off in a periodic box, like the RandomBlast problem. Then the background will be very non-uniform :D |
|
Regarding model 2, for supernovae that stay confined to the disk, I think it's a fine model. However, I am slightly concerned that this model might artificially inhibit the buoyancy of superbubbles. Buoyancy-driven winds can be significant for some galaxies. So I think the best test to compare would be of models 1 and 2 in a stratified box, where the Brunt-Vaisala timescale is less than or comparable to the cooling timescale. @markkrumholz Do you have any thoughts on this particular issue? |
|
That looks nice! The only possible improvement that I can think of is to do the deposition using a spherical kernel, such as one of the Wendland kernels (https://link.springer.com/article/10.1007/BF02123482). There is an implementation of Wendland's quokka/src/math/quadrature.hpp Line 13 in 371117f |
The model 1 and model 2 in my draft are basically the same model, the only difference being model 2 does a smooth transition from unresolved to resolved phase. Therefore, model 2 is always (slightly) better than model 1. I also observe that in my tests. I don't get how that model could "artificially inhibit the buoyancy of superbubbles". |
Your description of the models was:
So if you only inject kinetic energy in the resolved regime, then you are not directly increasing the entropy of the gas. The entropy of the gas will increase after it shocks, but it may be delayed compared to when the ISM entropy should increase, so any high-entropy bubbles may not rise as far as they should. |
|
Your plot of the maximum temperature with this model suggests there could be an effect like this, since the maximum temperature is less for Model 2 compared to Model 1 in the resolved phase. |
Oh, I was referring to a different 'model 1' and 'model 2'. Never mind. I will give a thorough reply tomorrow. |
|
I am now convinced that model 1, "Thermal energy deposition in the resolved regime, ...", is as good as model 2, as long as we have a reliable cooling module like the one in Quokka. There is no difference in timesteps between the two models, as I argued above. The only advantage of model 2 occurs when SNe are ejected into vacuum and the temperature goes to 10^9 K; an inaccurate cooling module (e.g. a single Backward Euler) could lead to overcooling or an inaccurate cooling curve. Besides, while both models have similar timesteps, model 1 places more pressure on the cooling step, which could negatively impact performance if it requires many iterations. model 1 and model2 are only different when RM < 0.027, which occurs at n <~ 0.1 cm-3. The realistic ISM test I did above has a background density of ~0.5 cm-3, so these two models make no difference. Considering this, I reckon model 2 does nothing to prevent superbubbles, because pure kinetic deposition is only activated when the shell formation is well resolved (dx < 0.1 R_sf. Note that we use 3 cells and 0.3^3 = 0.027), and in this regime, the ambient gas gets immediately shock-heated and the subsequent evolution is very similar between the two models. See temporal profiles below and pay attention to the last panel -- the max temperature v.s. time in log-log scale.
|
for more information, see https://pre-commit.ci
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
@BenWibking I tried on my computer and all the tests that use GrackleLikeCooling failed with I think we really need to add one of the test problems with GrackleLikeCooling into the unit tests. Currently none of those problems are activated. We can reduce max_timesteps to make ti run fast. That will help catch any problem caused by Grackle cooling module. |
|
I have to temporarily disable FPE in test_SN. Another option is to disable Grackle cooling for test_SN.cpp. The SN feedback module does not rely on cooling anyway. |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
### Description The previous `Gravity3D` problem tested too many things simultaneously, making it hard to track specific module functions. Consequently, I have replaced it with a new test called `ParticleCreation`, which tests particle creation from cell, stellar evolution, and particle destruction. It's unnecessary to test gravity in this problem because gravity is tested in `BinaryOrbit`. Similarly, SN feedback is tested in the `SN` test in #995. Additionally, `Gravity3D` is badly named. More changes: - Add logging of the number of particles created inside `createParticlesImpl` - Add logging of the number of particles removed at each level inside `destroyParticlesImpl` - `updateEvolutionStage` updates a particle's stage based on its `deathtime`. - Add an extra evolution stage: `Removed`. Only those particles will be removed. - Updated the format of `printParticleStatistics` ### Checklist _Before this pull request can be reviewed, all of these tasks should be completed. Denote completed tasks with an `x` inside the square brackets `[ ]` in the Markdown source below:_ - [x] I have added a description (see above). - [x] I have added a link to any related issues (if applicable; see above). - [x] I have read the [Contributing Guide](https://github.com/quokka-astro/quokka/blob/development/CONTRIBUTING.md). - [x] I have added tests for any new physics that this PR adds to the code. - [x] *(For quokka-astro org members)* I have manually triggered the GPU tests with the magic comment `/azp run`. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
|
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
This PR is well tested and should work just fine. @BenWibking If you want to use this for a test run for your talk or proposal, go for it. |
A star formation model to create the star particles is still needed though, right? |
Right. We'll need Aditi's StochasticStellarPop module. |
|
Just want to check on the status of this code, since I'm now back online. Is there stuff I should review, or @BenWibking are you happy to do so? I will also go look at the paper draft in any event. |
@markkrumholz Oh. I specifically requested waiting until your review before we merge this branch. Ben has reviewed it and I have addressed all his comments. |







Description
In this PR I implement a new SNe feedback model that smoothly transitions between thermal feedback, kinetic feedback, and momentum feedback, depending on how well the cooling/shell formation phase of the SNR evolution is resolved. An innovation of this scheme is that we do a two stage deposition scheme to account for SNR overlapping and get rid of depedence on the order that SNe events occur.
I have tested three models:
At a SN event, we distribute mass, momentum, and energy uniformly among the cells that intercect with s sphere of radius
3 dxcentered at the center of the cell that the SN is located in. No background smoothing is conducted before deposition.The results looks great! See figure below. Both model 1 and 2 produces 'correct' and almost identical results. The only difference is the maximum temperature (defined as the maximum temperature in any cell throughout the simulation) in model 2 is slightly lower than that in model 1. In model 2, right after SN explosion, the gas is cool but moves fast, and the shock wave immediately heat the gas to comparable temperature to that in the thermal model. After some experiments, I am convinced that the thermal model and kinetic model (in the resolved regime) has no difference in accuracy or performance related to timestep. This is because, imagine a star explodes into vacuum, q simple calculation will show that the sound speed of the hot SNR in the pure thermal model is about$1/\sqrt{3}$ times the bulk velocity of the cool SNR in the pure kinetic model (microscopic thermal motion has three degrees of freedom while kinetic motion has one). The thermal model turns out to have slightly longer timestep overall. In the TIGRESS model they advocate thermal model because they have over cooling issue, but we don't have this issue at all (thanks to Ben's awesome Grackle cooling module which has a robust ODE solver).
Checklist
Before this pull request can be reviewed, all of these tasks should be completed. Denote completed tasks with an
xinside the square brackets[ ]in the Markdown source below:/azp run.